import React from 'react';
import './index.css';

function Case(props) {

  return (
    <div className='question-case-item'>
      <div className='question-item-subject'>
        {props.detail.subject === 'math' ? '内科' : '外科'}
      </div>
      <div className='question-item-question'>
        {props.detail.question}
      </div>
      <div className='question-item-answers'>
        <div className='answers-item'>A：{props.detail.answers[0]}</div>
        <div className='answers-item'>B：{props.detail.answers[1]}</div>
        <div className='answers-item'>C：{props.detail.answers[2]}</div>
        <div className='answers-item'>D：{props.detail.answers[3]}</div>
      </div>
      <div className='question-item-right'>
        {props.detail.answer}
      </div>
      <div className='check-button' onClick={()=>{props.remove(props.detail.id)}}>删除</div>
    </div>
  );
}

export default Case;
